Clean Polygons - Clean topology of a polygon theme

- Activate the polygon theme to be cleaned in the views table of contents first.
- Click on
in the button bar to open the dialog (see above).
- Features: You can either clean the Selected or All polygons of the active theme. The number of polygon features is shown behind the two options. Even if you clean only the selected polygons, all polygons are used to clean gaps and overlaps.
- Truncate Coordinates: Activate this option in order to truncate the coordinates of all polygons (see Truncating Coordinates). Even if you clean only the selected polygons (option Selected), all polygons are processed - otherwise small gaps and overlaps may result.
- Decimal Places: Enter the number of decimal places that shall remain. The value should be set to ca. 1/10 mm on the map (this means according to its scale 2 places at 1:1.000, 1 place at 1:10.000, 0 places at 1:100.000 etc.). The default value comes up to 1/100.000 of the theme extent.
- Remove identical vertices: Activate this option to delete all redundant vertices. These are all consecutive vertices having the same coordinate after truncation. Identical vertices that are not succeeding each other are remaining.
- Clean Polygons: There are 3 options to clean the internal polygon structure:
- Clean incorrect polygons: Activate this option to check the internal topology of the polygons. This is time-consuming and usually only necessary for shapefiles that were imported from an ARC/INFO Coverage (see General Information).
- Remove zero point vertices: Activate this option to remove all vertices with the coordinate 0/0 from the contour of the polygons (these may result from truncation errors in ArcView and must be removed in any case - see General Information).
- Explode multipart polygons: Activate this option to explode polygons with several spatially separated parts into multiple single polygons (records).
- Clean Fuzzy Vertices: Activate this option to clean so-called fuzzy vertices. These vertices are created by editing shapefiles due to the variable Fuzzy Tolerance of ArcView. They cause tiny little gaps and overlaps that are not visible at a normal scale and can't be cleaned with on board functions of ArcView (see General Information). These errors are cleaned by snapping all other vertices in the nearest surroundings to this point. If there are no other vertices, the missing vertex is inserted in the contour of the adjacent polygon. If there is even no other polygon contour within the tolerance, the fuzzy vertex can't be cleaned (those vertices are reported as "fuzzy errors"). This can actually only happen, when there are overlaps in the theme but you don't clean them (i.e. the option Move Overlapping Areas to File is deactivated).
- Display Errors as Graphics: Activate this option if you want to see where errors have been found and cleaned. Large filled gaps are shown green, small gaps blue
, sliver polygons that have been appended to other polygons red and those that have been deleted dark red,
fuzzy vertices that have been cleaned magenta and those that could not be cleaned yellow. These graphics are added to the view permanently and are therefore stored in the project. In order to keep the size of the project file small, you should delete these graphics (Del key) if you don't need them any more.
Number of Passes: Here you can specify how often the shapefile should be cleaned. It may happen that heavily damaged shapefiles can't be cleaned completely at the first step. Use 2 or 3 passes to ensure that all errors are cleaned.
Remove Polygons: There are 3 different methods to determine Sliver Polygons for removal. The number of chosen polygons is shown in the heading.
- Selected: All selected polygons will be removed.
- Smaller: Polygons smaller than the specified area (in map units) will be removed. Default value is 1/100.000 of the theme extent. You should not enter too large values, because otherwise polygons will get lost, which are still required.
- Thinner: Polygons having a Thinness Ratio larger than the specified value will be removed. This is the ratio between the area of the polygon and the square of its maximum elongation in X and Y axis (see Thinness Ratio). The larger the value, the thinner is the polygon. At a value of 10 the polygon covers the tenth part of its extent. Squares reach the minimum value of 1. As narrow polygons will be removed independent from their size, you must choose this value carefully. At values smaller than 20 lots of polygons will be removed yet. If your theme contains linear structures like roads or rivers (their ratio goes from 100 to 1000), this method is unsuitable.
- Method: Select the method to remove the polygons. Normally you should not select Delete Polygon as this would create gaps. With all other methods the polygon is appended to an adjacent polygon using different functions for finding the best matching polygon (see Fill Gaps). A polygon without neighbors (an island without other adjacent polygons) is deleted anyway (those polygons are reported as "lost").
- Analysis: Click on

to analyze area or thinness of the polygone theme. First the field [Area] or [Thinness] will be created in the source theme and then classified with the Natural Breaks classification. This gives the most distinguished classes with minimum variances within each class. Select a class in the list to remove all smaller or thinner polygons (the number of chosen polygons is shown in brackets) and click on
.
Normally 20 classes are created and the first class gives the very small or thin sliver polygons. If the classification was too coarse (too many polygons) click on
. Try again while pressing the Ctrl key to get 30, the Shift key to get 40 or Ctrl+Shift to get 50 classes. When you delete the new data field from the theme table, the ratio will be recalculated at the next analysis (otherwise the values are not updated).
Fill Gaps: There are 3 different methods to determine gaps that shall be removed.
- All: All existing gaps will be filled.
- Smaller: Gaps smaller than the specified area (in map units) will be filled. Default value is 1/100.000 of the theme extent.
- Thinner: Gaps having a Thinness Ratio larger than the specified value will be filled (see Remove Polygons above).
- Method: Select the method to fill the gaps. Normally you should not select Add New Polygon as this would create many small polygons without data (field values). With all other methods the gap is appended to an adjacent polygon using different functions for finding the best matching polygon:
- Add New Polygon - Delete Polygon: The polygon/gap will not be joined to another polygon but added as a new polygon or just deleted. In both cases you will get unwanted results (tiny polygons instead of gaps and vice versa). You should use this method only if you want to join the filled gaps with adjacent polygons manually later (the new polygons will be added at the end of the table and can be identified by their empty fields).
- Highest Inclusion - Lowest Inclusion: The polygon/gap will be joined to the polygon that encloses it most respectively least. The enclosed area, i.e. the part of the polygon/gap that is situated inside of the adjacent polygon, is calculated by replacing the borderline with a straight line (the straight line between the two end points of the shared borderline is used to split the polygon). This method mostly gives the best results, because length and frayness of the borderline has no effect.
- Smallest Angle - Largest Angle: The polygon/gap will be joined to the polygon where the smallest respectively largest deviation of the contour results. For this purpose the angles between the end segments of the adjoining borderlines are summed up (at the node where the two lines meet). This method gives very good results too, chiefly if you want to remove small polygons that result from intersecting polygons (the angles between the divided sections are almost always 0°).
- Longest Border - Shortest Border: The polygon/gap will be joined to the polygon with the longest respectively shortest shared borderline. With this method it can happen that (depending on length and frayness of the borderline) the polygon/gap can form a kind of a bump at the adjacent polygon and joining it to another polygon would have looked better. However, this method normally leads to the largest reduction of the file size because the most vertices are removed.
- Maximum Area - Minimum Area: The polygon/gap will be joined to the largest respectively smallest adjacent polygon. This method is mostly not recommendable but can be used to make polygons as large as possible or to level out differences in size (enlarge small polygons).
Add new polygon if gap is larger than: Use this option for themes, that shall have no gaps for sure. Thereby all gaps larger than the specified area (in map units) are filled with new polygons. Combined with Fill Gaps you can achieve that small gaps are dissolved, but large gaps become new polygons that can be edited. This option always has priority so you can use the option All at Fill Gaps.
Remove hidden gaps along outline borders: Use this option to find gaps along the border of your theme (where are no neighboring polygons). These gaps are a kind of inversions or indentations in marginal polygons that are only closed at a single point. These gaps will either be dissolved (Fill Gaps option) or added as new polygons (see above option).
Move Overlapping Areas to File: If this option is activated overlapping areas in the shapefile are cleaned. This means that all invisible areas that are covered by other polygons are removed from the cleaned shapefile and stored in a separate shapefile. You can enter path and name of this shapefile here.
Output File for Cleaned Polygons: Here you can enter path and name of the output shapefile (default is clean01.shp in the path of the source theme). If this option is deactivated, cleaning is done directly in the source theme (only possible with shapefiles). If the source theme already is in edit mode, this option is deactivated by default.
Click on
to start cleaning the active polygon theme using the current settings.
Finally the cleaned polygon theme and (if overlaps have been removed) the theme with the removed overlapping areas will be added to the current view. A report is displayed in a small window with number and type of the cleaned errors. Click on
to close this window.
Hint: In order to reopen the dialog with the current settings press the Shift key when clicking on the
button. Thereby you can rerun the cleaning process or apply the same cleaning on other themes.
© 2003 WLM Klosterhuber & Partner OEG